﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Drawing;

namespace QLNSService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IQLNSService" in both code and config file together.

    //----------------PHU CAP LUONG VA CAC PHU CAP KHAC----------------

    [DataContract]
    public class LCB
    {
        [DataMember]
        public float LUONGCOBAN { get; set; }
    }

    [DataContract]
    public class TINHLUONG
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order=1)]
        public string HoTen { get; set; }
        [DataMember(Order = 2)]
        public string ChucVu { get; set; }
        [DataMember(Order = 3)]
        public string DonVi { get; set; }
        [DataMember(Order = 4)]
        public float HeSoLuong { get; set; }
        [DataMember(Order = 5)]
        public float LuongChinh { get; set; }
        [DataMember(Order = 6)]
        public float KhoanTru { get; set; }
        [DataMember(Order = 7)]
        public float ThucLanh { get; set; }
        [DataMember(Order = 8)]
        public DateTime ThangNam { get; set; }
    }


    [DataContract]
    public class TAI_KHOAN
    {
        [DataMember(Order = 0)]
        public string Ma_TK { get; set; }
        [DataMember(Order = 1)]
        public string MatKhau { get; set; }
        [DataMember(Order = 2)]
        public int LoaiTK { get; set; }
    }
    

    [DataContract]
    public class PHU_CAP
    {
        [DataMember(Order=0)]
        public string Ma_PC { get; set; }
        [DataMember(Order=1)]
        public string DienGiai { get; set; }
        [DataMember(Order=2)]
        public float HeSoPC { get; set; }
        [DataMember(Order = 3)]
        public string DVT { get; set; }
    }


    //-------------Phi tru------------------
    [DataContract]
    public class PHI_TRU
    {
        [DataMember(Order = 0)]
        public string Ma_PT { get; set; }
        [DataMember(Order = 1)]
        public string TenPT { get; set; }
        [DataMember(Order=2)]
        public float HeSoPT { get; set; }
        [DataMember(Order = 3)]
        public bool TrangThai { get; set; }
    }


    //------------------Phu cap giao vien------------------
    [DataContract]
    public class PHUCAP_GIAOVIEN
    {
        [DataMember(Order = 0)]
        public int Ma_PCGV { get; set; }
        [DataMember(Order = 1)]
        public string TenPCGV { get; set; }
        [DataMember(Order=2)]
        public float HeSoPCGV { get; set; }
    }


    //---------------loai phu cap kiem nhiem----------------

    [DataContract]
    public class LOAI_PCKN
    {
        [DataMember(Order = 0)]
        public int Ma_LoaiPCKN { get; set; }
        [DataMember(Order = 1)]
        public string TenLPCKN { get; set; }
    }

    //---------------Phu cap kiem nhiem-----------------
    [DataContract]
    public class PHUCAP_KIEMNHIEM
    {
        [DataMember(Order = 0)]
        public int Ma_PCKN { get; set; }
        [DataMember(Order = 1)]
        public string TenPCKN { get; set; }
        [DataMember(Order = 2)]
        public float HeSoPCKN { get; set; }
        [DataMember(Order = 3)]
        public int Ma_LoaiPCKN { get; set; }
        [DataMember(Order = 4)]
        public string Ma_Loai_DV { get; set; }
    }


    //------------------------quyet dinh kiem nhiem---------------------
    [DataContract]
    public class CANBO_PCKN
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public int Ma_PCKN { get; set; }
        [DataMember(Order = 2)]
        public string Ma_DV { get; set; }
        [DataMember(Order = 3)]
        public string QuyetDinhKN { get; set; }
        [DataMember(Order = 4)]
        public DateTime NgayKyKN { get; set; }
        [DataMember(Order = 5)]
        public Byte[] FileQuyetDinhKN { get; set; }
        [DataMember(Order = 6)]
        public bool TrangThaiKN { get; set; }
    }

    //--------------Phu cap tham nien-------------------
    [DataContract]
    public class PHUCAP_THAMNIEN
    {
        [DataMember(Order = 0)]
        public int Ma_PCTN { get; set; }
        [DataMember(Order = 1)]
        public string TenPCTN { get; set; }
        [DataMember(Order = 2)]
        public int HeSoPCTN { get; set; }
    }

    [DataContract]
    public class CANBO_PCTHAMNIEN
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public int Ma_PCTN { get; set; }
        [DataMember(Order = 2)]
        public string QuyetDinhTN { get; set; }
        [DataMember(Order = 3)]
        public DateTime NgayKyTN { get; set; }
        [DataMember(Order = 4)]
        public Byte[] FileQuyetDinhTN { get; set; }
    }


    //====================he so tham nien hien tai===================
    [DataContract]
    public class HSTN_HIENTAI
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public string HoTen { get; set; }
        [DataMember(Order = 2)]
        public int GiaTriTN { get; set; }
        [DataMember(Order = 3)]
        public string QuyetDinhTN { get; set; }
        [DataMember(Order = 4)]
        public DateTime NgayTN { get; set; } 

    }

    //===============SAP TANG THAM NIEN===================
    [DataContract]
    public class SAPTANGTN
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public string HoTen { get; set; }
        [DataMember(Order = 2)]
        public int GiaTriTN { get; set; }
        [DataMember(Order = 3)]
        public DateTime NgayTN { get; set; } 
    }

    //-----------------HE SO LUONG HIEN TAI----------------------
    [DataContract]
    public class HSL_HIENTAI
    {
        [DataMember(Order=0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public string HoTen { get; set; }
        [DataMember(Order = 2)]
        public string Ten_Ngach { get; set; }
        [DataMember(Order = 3)]
        public int Ma_BL { get; set; }
        [DataMember(Order = 4)]
        public string QuyetDinh { get; set; }
        [DataMember(Order = 5)]
        public DateTime NgayHieuLuc { get; set; }
    }



    //------------------REPORT-----------------------
    [DataContract]
    public class RPKT
    {
        [DataMember]
        public string DienGiai { get; set; }
        [DataMember]
        public int SoCB { get; set; }
    }
    
    
    //------------SĂP LÊN LƯƠNG-------------------
    [DataContract]
    public class SAPLENLUONG
    {
        [DataMember(Order=0)]
        public string Ma_CB { get; set; }
        [DataMember(Order=1)]
        public string HoTen { get; set; }
        [DataMember(Order=2)]
        public string Ma_Ngach { get; set; }
        [DataMember(Order=3)]
        public int Ma_BL { get; set; }
        [DataMember(Order=4)]
        public DateTime NgayLLTRuoc { get; set; }
    }
    
    
    
    
    
    //-----------------CAN BO--------------------

    [DataContract]
    public class THONGKEKL
    {
        [DataMember(Order = 0)]
        public string HoTen { get; set; }
        [DataMember(Order = 1)]
        public string TenDV { get; set; }
        [DataMember(Order = 2)]
        public string NoiDung { get; set; }
        [DataMember(Order = 3)]
        public DateTime NgayKy { get; set; }
        
    }

    [DataContract]
    public class ReportLoaiKL
    {
        [DataMember(Order = 0)]
        public string HoTen { get; set; }
        [DataMember(Order = 1)]
        public string TenDV { get; set; }
        [DataMember(Order = 2)]
        public string NoiDung { get; set; }
        [DataMember(Order = 3)]
        public DateTime NgayKy { get; set; }
        [DataMember(Order = 4)]
        public string DienGiai { get; set; }
    }


    [DataContract]
    public class ReportLoaiKT
    {
        [DataMember(Order = 0)]
        public string HoTen { get; set; }
        [DataMember(Order = 1)]
        public string TenDV { get; set; }
        [DataMember(Order = 2)]
        public string NoiDung { get; set; }
        [DataMember(Order = 3)]
        public DateTime NgayKy { get; set; }
        [DataMember(Order = 4)]
        public string DienGiai { get; set; }
    }



    [DataContract]
    public class THONGKEKT
    {
        [DataMember(Order=0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public string HoTen { get; set; }
        [DataMember(Order = 2)]
        public string TenDV { get; set; }
        [DataMember(Order = 3)]
        public string NoiDung { get; set; }
        [DataMember(Order = 4)]
        public DateTime NgayKy { get; set; }
    }
    
    
    
    [DataContract]
    public class CAN_BO
    {
        [DataMember(Order = 0)]
        public Byte[] HinhAnh { get; set; }
        [DataMember(Order=1)]
        public string Ma_CB { get; set; }
        [DataMember(Order=2)]
        public string HoTen { get; set; }
        [DataMember(Order = 3)]
        public string TenKhac { get; set; }
        [DataMember(Order = 4)]
        public DateTime NamSinh { get; set; }
        [DataMember(Order = 5)]
        public string GioiTinh { get; set; }
        [DataMember(Order = 6)]
        public string NoiSinh { get; set; }
        [DataMember(Order = 7)]
        public string QueQuan { get; set; }
        [DataMember(Order = 8)]
        public string HoKhau { get; set; }
        [DataMember(Order = 9)]
        public string Cho_O { get; set; }
        [DataMember(Order = 10)]
        public string NgheNghiep { get; set; }
        [DataMember(Order = 11)]
        public DateTime NgayTuyenDung { get; set; }
        [DataMember(Order = 12)]
        public bool DangVien { get; set; }
        [DataMember(Order = 13)]
        public bool NhapNgu { get; set; }
        [DataMember(Order = 14)]
        public string SucKhoe { get; set; }
        [DataMember(Order = 15)]
        public string ThuongBinh { get; set; }
        [DataMember(Order = 16)]
        public string SoCMND { get; set; }
        [DataMember(Order = 17)]
        public DateTime NgayCap { get; set; }
        [DataMember(Order = 18)]
        public string NoiCap { get; set; }
        [DataMember(Order = 19)]
        public string SoBHXH { get; set; }
        [DataMember(Order = 20)]
        public int Ma_DT { get; set; }
        [DataMember(Order = 21)]
        public int Ma_TG { get; set; }
        [DataMember(Order = 22)]
        public int Stt_GD_CS { get; set; }
        [DataMember(Order = 23)]
        public string Ma_DV { get; set; }
    }
    
    
    //---------DON VI HANH CHINH--------------
    [DataContract]
    public class DONVI_HANHCHINH
    {
        [DataMember]
        public string Ma_DV_HC { get; set; }
        [DataMember]
        public string TenDVHC { get; set; }
    }

   

    //----------------DON VI TRUC THUOC--------------
    [DataContract]
    public class DANHMUC_DONVI
    {
        [DataMember(Order=0)]
        public string Ma_DV { get; set; }
        [DataMember(Order=1)]
        public string TenDVTT { get; set; }
        [DataMember(Order=2)]
        public string Ma_DV_CQ { get; set; }
        [DataMember(Order=3)]
        public string Ma_Loai_DV { get; set; }
    }


    //--------------LOAI DON VI------------------------
    [DataContract]
    public class LOAI_DV
    {
        [DataMember]
        public string Ma_Loai_DV { get; set; }
        [DataMember]
        public string TenLoaiDV { get; set; }
    }




    //----------------CHUC VU---------------
    [DataContract]
    public class CHUC_VU
    {
        [DataMember(Order=0)]
        public string Ma_CV { get; set; }
        [DataMember(Order=1)]
        public string TenCV { get; set; }
        [DataMember(Order=2)]
        public float HeSoCV { get; set; }
        [DataMember(Order = 3)]
        public string Ma_Loai_DV { get; set; }
    }

    //--------------CAN BO_ CHUC VU-------------
    [DataContract]
    public class CANBO_CHUCVU
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        [DataMember(Order=1)]
        public string Ma_CV { get; set; }
        [DataMember(Order=2)]
        public string Ma_DV { get; set; }
        [DataMember(Order=3)]
        public string QuyetDinh { get; set; }
        [DataMember(Order=4)]
        public DateTime NgayKy { get; set; }
        [DataMember(Order=5)]
        public Byte[] FileQuyetDinh { get; set; }
        [DataMember(Order = 6)]
        public bool TrangThaiCV { get; set; }
      
    }



    //-----------------KY LUAT----------------
    [DataContract]
    public class KY_LUAT
    {
        [DataMember]
        public int Ma_KL { get; set; }
        [DataMember]
        public string DienGiai { get; set; }
    }

    //---------CAN BO - KY LUAT-----------
    [DataContract]
    public class CANBO_KYLUAT
    {
        [DataMember(Order=0)]
        public string Ma_CB { get; set; }
        [DataMember(Order = 1)]
        public int Ma_KL { get; set; }
        [DataMember(Order = 2)]
        public string NoiDung { get; set; }
        [DataMember(Order=3)]
        public string QuyetDinh { get; set; }
        [DataMember(Order=4)]
        public DateTime NgayKy { get; set; }
        [DataMember(Order=5)]
        public Byte[] FileQuyetDinh { get; set; }
    }

    //---------------KHEN THUONG---------------
    [DataContract]
    public class KHEN_THUONG
    {
        [DataMember]
        public int Ma_KT {get; set;}
        [DataMember]
        public string DienGiai{get; set;}
    }

    //------------CAN BO - KHEN THUONG-----------

    [DataContract]
    public class CANBO_KHENTHUONG
    {
        [DataMember(Order = 0)]
        public string Ma_CB { get; set; }
        
        [DataMember(Order = 1)]
        public int Ma_KT { get; set; }

        [DataMember(Order = 2)]
        public string NoiDung { get; set; }

        [DataMember(Order = 3)]
        public string QuyetDinh { get; set; }

        [DataMember(Order = 4)]
        public DateTime NgayKy { get; set; }
        
        [DataMember(Order = 5)]
        public Byte[] FileQuyetDinh { get; set; }
    }

    //--------------TON GIAO----------------
    [DataContract]
    public class TON_GIAO
    {
        [DataMember]
        public int Ma_TG {get; set; }
        [DataMember]
        public string TenTG { get; set; }

    }
    //-------------------DAN TOC--------------
    [DataContract]
    public class DAN_TOC
    {
        [DataMember]
        public int Ma_DT { get; set; }
        [DataMember]
        public string TenDT { get; set; }
    }
    //----------------GIA DINH CHINH SACH-------------
    [DataContract]
    public class GDCS
    {
        [DataMember]
        public int Stt_GD_CS { get; set; }
        [DataMember]
        public string DienGiai { get; set; }
    }
    
    //-------------lOAI NGACH LUONG---------------
    [DataContract]
    public class LOAI_NGACH
    {
        [DataMember]
        public string Ma_Loai_Ngach { get; set; }
        [DataMember]
        public string TenLoaiNgach { get; set; }

    }


    //------------NGACH LUONG----------------
    [DataContract]
    public class NGACH
    {
        [DataMember(Order=0)]
        public string Ma_Ngach { get; set; }
        [DataMember(Order = 1)]
        public string TenNgach { get; set; }
        [DataMember(Order = 2)]
        public string Ma_Loai_Ngach { get; set; }
    }
    //-------------BAC LUONG---------------
    [DataContract]
    public class BAC_LUONG
    {
        [DataMember]
        public int Ma_BL { get; set; }
      
    }

    //-------------HE SO LUONG--------------
    [DataContract]
    public class HESO_LUONG
    {
        [DataMember(Order = 0)]
        public string Ma_Loai_Ngach { get; set; }
        [DataMember(Order = 1)]
        public int Ma_BL { get; set; }
        [DataMember(Order = 2)]
        public float Ma_HS_Luong { get; set; }
        
        
    }
    
    //---------------QUYET DINH NGACH BAC HE SO LUONG----------------
    [DataContract]
    public class CANBO_NGACH_LUONG
    {
        [DataMember(Order=0)]
        public string Ma_CB { get; set; }
        [DataMember(Order=1)]
        public string Ma_Ngach { get; set; }
        [DataMember(Order=2)]
        public int Ma_BL { get; set; }
        [DataMember(Order=3)]
        public string QuyetDinh { get; set; }
        [DataMember(Order=4)]
        public string NoiDung { get; set; }
        [DataMember(Order = 5)]
        public DateTime NgayKy { get; set; }
        [DataMember(Order=6)]
        public DateTime NgayHieuLuc { get; set; }
        [DataMember(Order=7)]
        public Byte[] FileQuyetDinh { get; set; }
    }





    //----------HO SO DANG---------------
    [DataContract]
    public class HOSO_DANG
    {
        [DataMember]
        public string Ma_HSD { get; set; }
        [DataMember]
        public DateTime NgayVaoL1 { get; set; }
        [DataMember]
        public string NguoiGioiThieu1 { get; set; }
        [DataMember]
        public DateTime NgayVaoL2 { get; set; }
        [DataMember]
        public string NguoiGioiThieu2 { get; set; }
        [DataMember]
        public DateTime NgayChinhThuc1 { get; set; }
        [DataMember]
        public DateTime NgayChinhThuc2 { get; set; }
        [DataMember]
        public string ChiBo { get; set; }
        [DataMember]
        public string Ma_CB { get; set; }
    }

    //----------------CHI TIET SUC KHOE-----------------
    [DataContract]
    public class CHITIET_SUCKHOE
    {
        [DataMember]
        public int Stt_SucKhoe { get; set; }
        [DataMember]
        public string TinhTrang { get; set; }
        [DataMember]
        public float ChieuCao { get; set; }
        [DataMember]
        public float CanNang { get; set;}
        [DataMember]
        public string NhomMau { get; set; }
        [DataMember]
        public string Ma_CB { get; set; }
    }


//--------------CHI TIET NHAP NGU----------------

    [DataContract]
    public class CHITIET_NHAPNGU
    {
        [DataMember]
        public int Stt_NhapNgu { get; set; }
        [DataMember]
        public DateTime NgayNhap { get; set; }
        [DataMember]
        public DateTime NgayXuat { get; set; }
        [DataMember]
        public string QuanHam { get; set; }
        [DataMember]
        public string Ma_CB { get; set; }
    }

    
    

    //----------CAN BO_PHU CAP----------------
    [DataContract]
    public class CANBO_PHUCAP
    {
        [DataMember]
        public string Ma_CB { get; set; }
        [DataMember]
        public int Ma_PC { get; set; }
    }

    //------------DANH HIEU-----------
    [DataContract]
    public class DANH_HIEU
    {
        [DataMember]
        public string Ma_DH { get; set; }
        [DataMember]
        public string TenDH { get; set; }
    }

    //------------CAN BO _ DANH HIEU-----------------
    [DataContract]
    public class CANBO_DANHHIEU
    {
        [DataMember]
        public string Ma_DH { get; set; }
        [DataMember]
        public string Ma_CB { get; set; }
        [DataMember]
        public string QuyetDinh { get; set; }
        [DataMember]
        public DateTime NgayKy { get; set; }
        [DataMember]
        public string NoiDung { get; set; }
        [DataMember]
        public string FileQuyetDinh { get; set; }
    }








    //----------------------SERVICE--------------------
    [ServiceContract]
    public interface IQLNSService
    {
        //-------------CAN BO------------------------------
        [OperationContract]
        List<CAN_BO> getCB();
        [OperationContract]
        List<CAN_BO> getCBtheoDV(string Ma_DV);
        [OperationContract]
        List<CAN_BO> getdsCBtheoDV(string Ma_DV);
        [OperationContract]
        List<CAN_BO> getTenCBtheoMaCB(string Ma_CB);

        [OperationContract]
        int addCB(CAN_BO cb);
        [OperationContract]
        int updateCB(CAN_BO cb);
        [OperationContract]
        int deleteCB(string Ma_CB);

        [OperationContract]
        List<CAN_BO> getLastMa_CB();
        
        
        
        
        
        
        //------------DON VI HANH CHINH---------------
        [OperationContract]
        List<DONVI_HANHCHINH> getDVHC();
        [OperationContract]
        int  addDVHC(DONVI_HANHCHINH dvhc);
        [OperationContract]
        int updateDVHC(DONVI_HANHCHINH dvhc);
        [OperationContract]
        void deleteDVHC(string Ma_DV_HC);
        [OperationContract]
        List<DONVI_HANHCHINH> getLastDVHC();

        //----------------KY LUAT----------------------
        [OperationContract]
        List<KY_LUAT> getKL();
        [OperationContract]
        int addKL(KY_LUAT kl);
        [OperationContract]
        int updateKL(KY_LUAT kl);
        [OperationContract]
        void deleteKL(string Ma_KL);

        //---------------KHEN THUONG---------------
        [OperationContract]
        List<KHEN_THUONG> getKT();
        [OperationContract]
        int addKT(KHEN_THUONG kt);
        [OperationContract]
        int updateKT(KHEN_THUONG kt);
        [OperationContract]
        void deleteKT(string Ma_KT);

        //--------------TON GIAO------------------
        [OperationContract]
        List<TON_GIAO> getTG();
        [OperationContract]
        int addTG(TON_GIAO tg);
        [OperationContract]
        int updateTG(TON_GIAO tg);
        [OperationContract]
        void deleteTG(string Ma_TG);
        [OperationContract]
        List<TON_GIAO> getLastTG();

        //---------------DAN TOC--------------------
        [OperationContract]
        List<DAN_TOC> getDT();
        [OperationContract]
        int addDT(DAN_TOC dt);
        [OperationContract]
        int updateDT(DAN_TOC dt);
        [OperationContract]
        void deleteDT(string Ma_DT);
        [OperationContract]
        List<DAN_TOC> getLastDT();

        //---------------GIA DINH CHINH SACH--------------
        [OperationContract]
        List<GDCS> getGDCS();
        [OperationContract]
        int addGDCS(GDCS gdcs);
        [OperationContract]
        int updateGDCS(GDCS gdcs);
        [OperationContract]
        void deleteGDCS(string Stt_GD_CS);


        //-------------LOAI NGACH LUONG-----------------
        [OperationContract]
        List<LOAI_NGACH> getLNG();
        [OperationContract]
        int addLN(LOAI_NGACH lng);
        [OperationContract]
        int updateLNG(LOAI_NGACH lng);
        [OperationContract]
        void deleteLNG(string Ma_Loai_Ngach);


        //-----------NGACH LUONG-----------------
        [OperationContract]
        List<NGACH> getNgach();
        [OperationContract]
        List<NGACH> getMaLoaitheoMaNgach(string Ma_Ngach);
        [OperationContract]
        int addNgach(NGACH ng);
        [OperationContract]
        int updateNgach(NGACH ng);
        [OperationContract]
        void deleteNgach(string Ma_Ngach);

        //---------------BAC LUONG----------------
        [OperationContract]
        List<BAC_LUONG> getBL();
        [OperationContract]
        int addBL(BAC_LUONG bl);
        [OperationContract]
        int updateBL(BAC_LUONG bl);
        [OperationContract]
        void deleteBL(string Ma_BL);
        [OperationContract]
        List<BAC_LUONG> getMaBL();
        [OperationContract]
        List<BAC_LUONG> getLastBL();

        //---------------HE SO LUONG--------------
        [OperationContract]
        List<HESO_LUONG> getHSL();
        [OperationContract]
        List<HESO_LUONG> getBLHSLtheoLNG(string Ma_Loai_Ngach);
        [OperationContract]
        List<HESO_LUONG> getHSLtheoBL(string Ma_Loai_Ngach, string Ma_BL);
        [OperationContract]
        int addHSL(HESO_LUONG hsl);
        [OperationContract]
        int updateHSL(HESO_LUONG hsl);
        [OperationContract]
        void deleteHSL(HESO_LUONG hsl);



        //----------QUYET DINH NGACH BAC HE SO LUONG-----------
        [OperationContract]
        List<CANBO_NGACH_LUONG> getCBNL();
        [OperationContract]
        List<CANBO_NGACH_LUONG> getCBNLtheoDV(string Ma_DV);
        [OperationContract]
        int addCBNL(CANBO_NGACH_LUONG cbnl);
        [OperationContract]
        int updateCBNL(CANBO_NGACH_LUONG cbnl);
        [OperationContract]
        void deleteCBNL(string Ma_CB, string Ma_Ngach, string Ma_BL);

        

        //------------DANH MỤC ĐƠN VỊ---------------
        [OperationContract]
        List<DANHMUC_DONVI> getDMDV();
        [OperationContract]
        List<DANHMUC_DONVI> getTenDVtheoMaCB(string Ma_CB);
        [OperationContract]
        List<DANHMUC_DONVI> getDMDVtheoLoaiCV(string Ma_CV);
        [OperationContract]
        int addDMDV(DANHMUC_DONVI dmdv);
        [OperationContract]
        int updateDMDV(DANHMUC_DONVI dvtt);
        [OperationContract]
        void deleteDMDV(string Ma_DV);
        [OperationContract]
        List<DANHMUC_DONVI> getLastDVTT();
        [OperationContract]
        List<DANHMUC_DONVI> getDVTT_DV(string Ma_DV_HC);
        //------------------CHUC VU--------------------
        [OperationContract]
        List<CHUC_VU> getCV();
        [OperationContract]
        int addCV(CHUC_VU cv);
        [OperationContract]
        int updateCV(CHUC_VU cv);
        [OperationContract]
        void deleteCV(string Ma_CV);
        [OperationContract]
        List<CHUC_VU> getLastCV();
        

        //-------------CAN BO - CHUC VU-----------------
        [OperationContract]
        List<CANBO_CHUCVU> getCBCV();
        [OperationContract]
        int addCBCV(CANBO_CHUCVU cbcv);
        [OperationContract]
        int updateCBCV(CANBO_CHUCVU cbcv);
        [OperationContract]
        void deleteCBCV(string Ma_CB, string Ma_CV, string Ma_DV);

        //------------CAN BO- KHEN THUONG----------------
        [OperationContract]
        List<CANBO_KHENTHUONG> getCBKT();
        [OperationContract]
        List<CANBO_KHENTHUONG> getCBKTtheoDV(string Ma_DV_HC);
        [OperationContract]
        List<CANBO_KHENTHUONG> getCBKTtheoKT(int  Ma_KT);
        [OperationContract]
        int addCBKT(CANBO_KHENTHUONG cbkt);
        [OperationContract]
        int updateCBKT(CANBO_KHENTHUONG cbkt);
        [OperationContract]
        void deleteCBKT(int Ma_KT, string Ma_CB);

        //-------------CAN BO - KY LUAT -----------------
        [OperationContract]
        List<CANBO_KYLUAT> getCBKL();
        [OperationContract]
        List<CANBO_KYLUAT> getCBKLtheoDV(string Ma_DV);
        [OperationContract]
        List<CANBO_KYLUAT> getCBKLtheoKL(int Ma_KL);
        [OperationContract]
        int addCBKL(CANBO_KYLUAT cbkl);
        [OperationContract]
        int updateCBKL(CANBO_KYLUAT cbkl);
        [OperationContract]
        void deleteCBKL(int Ma_KL, string Ma_CB);

        //------------HO SO DANG----------------------]
        [OperationContract]
        List<HOSO_DANG> getHSD();
        [OperationContract]
        int addHSD(HOSO_DANG hsd);
        [OperationContract]
        int updateHSD(HOSO_DANG hsd);
        [OperationContract]
        void deleteHSD(string Ma_HSD);

        //------------CHI TIET SUC KHOE----------------
        [OperationContract]
        List<CHITIET_SUCKHOE> getCTSK();
        [OperationContract]
        int addCTSK(CHITIET_SUCKHOE ctsk);
        [OperationContract]
        int updateCTSK(CHITIET_SUCKHOE ctsk);
        [OperationContract]
        void deleteCTSK(string Stt_SucKhoe);

        //---------------CHI TIET NHAP NGU----------------
        [OperationContract]
        List<CHITIET_NHAPNGU> getCTNN();
        [OperationContract]
        int addCTNN(CHITIET_NHAPNGU ctnn);
        [OperationContract]
        int updateCTNN(CHITIET_NHAPNGU ctnn);
        [OperationContract]
        void deleteCTNN(string Stt_NhapNgu);


        //--------CAN BO - PHU CAP----------------
        [OperationContract]
        List<CANBO_PHUCAP> getCBPC();
        [OperationContract]
        int addCBPC(CANBO_PHUCAP cbpc);
        [OperationContract]
        int updateCBPC(CANBO_PHUCAP cbpc);
        [OperationContract]
        void deleteCBPC(string Ma_PC, string Ma_CB);

        //-----------DANH HIEU---------------
        [OperationContract]
        List<DANH_HIEU> getDH();
        [OperationContract]
        int addDH(DANH_HIEU dh);
        [OperationContract]
        int updateDH(DANH_HIEU dh);
        [OperationContract]
        void deleteDH(string Ma_DH);

        //------------CAN BO - DANH HIEU-----------------
        [OperationContract]
        List<CANBO_DANHHIEU> getCBDH();
        [OperationContract]
        int addCBDH(CANBO_DANHHIEU cbdh);
        [OperationContract]
        int updateCBDH(CANBO_DANHHIEU cbdh);
        [OperationContract]
        void deleteCBDH(string Ma_DH, string Ma_CB);


        //---------------LOAI DON VI-----------------
        [OperationContract]
        List<LOAI_DV> getLoaiDV();
        [OperationContract]
        int addLoaiDV(LOAI_DV ldv);
        [OperationContract]
        int updateLoaiDV(LOAI_DV ldv);




        //---------------THONG KE KHEN THUONG-------------------------

        [OperationContract]
        List<THONGKEKT> getThongKeKT(int Ma_KT, DateTime NgayKy);
        [OperationContract]
        List<THONGKEKT> getAllThongke();
        [OperationContract]
        List<THONGKEKT> getThongketheoNam(DateTime NgayKy);
        [OperationContract]
        int countSLKT(int Ma_KT, DateTime NgayKy);
        [OperationContract]
        int countKTtheoNam(DateTime NgayKy);
        [OperationContract]
        int countAllKT();
        [OperationContract]
        int countLDTT(DateTime NgayKy);
        [OperationContract]
        int countTDCS(DateTime NgayKy);
        [OperationContract]
        int countTDCB(DateTime NgayKy);
        [OperationContract]
        int countTDTQ(DateTime NgayKy);
        [OperationContract]
        List<THONGKEKT> getTKKTtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        List<THONGKEKT> getTKKTtheoNamDVMaKT(int Ma_KT, string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countKTtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countKTtheoNamDVMaKT(int Ma_KT, string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countAllKTtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countLDTTtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countTDCStheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countTDCBtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countTDTQtheoNamDV(string Ma_DV, DateTime NgayKy);


        //--------------------THONG KE KY LUAT----------------------------
        [OperationContract]
        List<THONGKEKL> getThongKeKL(int Ma_KL, DateTime NgayKy);
        [OperationContract]
        List<THONGKEKL> getThongkeKLtheoNam(DateTime NgayKy);
        [OperationContract]
        int countSLKL(int Ma_KL, DateTime NgayKy);
        [OperationContract]
        int countKLtheoNam(DateTime NgayKy);
        [OperationContract]
        int countKhientrach(DateTime NgayKy);
        [OperationContract]
        int countCanhcao(DateTime NgayKy);
        [OperationContract]
        int countHabacluong(DateTime NgayKy);
        [OperationContract]
        int countGiangchuc(DateTime NgayKy);
        [OperationContract]
        int countCachchuc(DateTime NgayKy);
        [OperationContract]
        int countBuocthoiviec(DateTime NgayKy);
        [OperationContract]
        List<THONGKEKL> getTTKLtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        List<THONGKEKL> getTKKLtheoNamDVMaKL(int Ma_KL, string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countKLtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countKLtheoNamDVMaKT(int Ma_KL, string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countKhientrachtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countCanhcaotheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countHabacluongtheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countGiangchuctheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countCachchuctheoNamDV(string Ma_DV, DateTime NgayKy);
        [OperationContract]
        int countBuocthoiviectheoNamDV(string Ma_DV, DateTime NgayKy);



        //----------------SAP LEN LUONG-------------------
        [OperationContract]
        List<SAPLENLUONG> getSLL();
        [OperationContract]
        List<SAPLENLUONG> getSLLtheoThang(DateTime NgayHieuLuc);
        [OperationContract]
        int countSSL();


        //--------------------REPORT--------------------------

        [OperationContract]
        List<RPKT> getSLKTtheoMaKT();

        [OperationContract]
        List<ReportLoaiKT> getReportLoaiKT(int Ma_KT, DateTime NgayKy);
        [OperationContract]
        List<ReportLoaiKL> getReportLoaiKL(int Ma_KL, DateTime NgayKy);


        //-------------------HE SO LUONG HIEN TAI----------------------
        [OperationContract]
        List<HSL_HIENTAI> getHSLHienTai();
        [OperationContract]
        int addHSLHienTai(HSL_HIENTAI hslht);
        [OperationContract]
        int updateHSLHienTai(HSL_HIENTAI hslht);
        [OperationContract]
        int checkQDCBNL(string Ma_CB);


        // ------------------HIEN THI NGACH VA BAC SAU KHI CHON NHAN VIEN----------------
        [OperationContract]
        List<NGACH> getNgachTheoCB(string Ma_CB);
        [OperationContract]
        List<BAC_LUONG> getBLtheoCB(string Ma_CB);


        //----------------------PHU CAP LUONG---------------------------------
        [OperationContract]
        List<PHU_CAP> getPC();
        [OperationContract]
        int addPC(PHU_CAP pc);
        [OperationContract]
        int updatePC(PHU_CAP pc);
        [OperationContract]
        void deletePC(string Ma_PC);

        //-------------PHI TRU----------------
        [OperationContract]
        List<PHI_TRU> getPT();
        [OperationContract]
        int addPT(PHI_TRU pt);
        [OperationContract]
        int updatePT(PHI_TRU pt);
        [OperationContract]
        void deletePT(string Ma_PT);

        //----------------phu cap tham nien-----------------
        [OperationContract]
        List<PHUCAP_THAMNIEN> getPCTN();
        [OperationContract]
        int addPCTN(PHUCAP_THAMNIEN pctn);
        [OperationContract]
        int updatePCTN(PHUCAP_THAMNIEN pctn);
        [OperationContract]
        void deletePCTN(int Ma_PCTN);
        [OperationContract]
        List<PHUCAP_THAMNIEN> getLastPCTN();

        //------------------phu cap kiem nhiem------------------

        [OperationContract]
        List<PHUCAP_KIEMNHIEM> getPCKN();
        [OperationContract]
        int addPCKN (PHUCAP_KIEMNHIEM pckn);
        [OperationContract]
        int updatepcKN(PHUCAP_KIEMNHIEM pckn);
        [OperationContract]
        void deletePCKN(int Ma_PCKN);
        [OperationContract]
        List<PHUCAP_KIEMNHIEM> getLastPCKN();

        //-----------------loai phu cap kiem nhiem----------------
        [OperationContract]
        List<LOAI_PCKN> getLPCKN();
        [OperationContract]
        int addLPCKN(LOAI_PCKN lpckn);
        [OperationContract]
        int updateLPCKN(LOAI_PCKN lpckn);
        [OperationContract]
        void deleteLPCKN(int Ma_LoaiPCKN);
        [OperationContract]
        List<LOAI_PCKN> getLastLPCKN();

        //-----------------phu cap giao vien------------------------
        [OperationContract]
        List<PHUCAP_GIAOVIEN> getPCGV();
        [OperationContract]
        int addPCGV(PHUCAP_GIAOVIEN pcgv);
        [OperationContract]
        int updatePCGV(PHUCAP_GIAOVIEN pcgv);
        [OperationContract]
        void deletePCGV(int Ma_PCGV);
        [OperationContract]
        List<PHUCAP_GIAOVIEN> getLastPCGV();







        //------------------quyet dinh kiem nhiem-------------------    
        [OperationContract]
        List<CANBO_PCKN> getCBPCKN();
        [OperationContract]
        int addCBPCKN(CANBO_PCKN cbpckn);
        [OperationContract]
        int updateCBPCKN(CANBO_PCKN cbpckn);
        [OperationContract]
        void deleteCBPCKN(string Ma_CB, int Ma_PCKN, string Ma_DV);
        [OperationContract]
        List<DANHMUC_DONVI> getDVtheoPCKN(int Ma_PCKN);
        [OperationContract]
        int checkCBKN(int Ma_PCKN, string Ma_DV);
        [OperationContract]
        int checkCBCV( string Ma_CV, string Ma_DV);



        //-------------------quyet dinh phu cap tham nien---------------------

        [OperationContract]
        List<CANBO_PCTHAMNIEN> getCBPCTN();
        [OperationContract]
        int addCBPCTN(CANBO_PCTHAMNIEN cbpctn);
        [OperationContract]
        int updateCBPCTN(CANBO_PCTHAMNIEN cbpctn);
        [OperationContract]
        void deleteCBPCTN(string Ma_CB, int Ma_PCTN);

        //==============he so tham nien hien tai=============
        [OperationContract]
        List<HSTN_HIENTAI> getHSTNHientai(string Ma_CB);
        [OperationContract]
        int addTNHienTai(HSTN_HIENTAI tnht);
        [OperationContract]
        int updateTNHienTai(HSTN_HIENTAI tnht);
        [OperationContract]
        List<HSTN_HIENTAI> getTNHT();

        //================sap tang tham nien===============
        [OperationContract]
        List<SAPTANGTN> getSapTangTN();
        [OperationContract]
        DataSet getCB_DV(string Ma_DV);
        [OperationContract]
        List<SAPTANGTN> getCBTN_DV(string Ma_DV);



        //==========================tai khoan dang nhap========================
        [OperationContract]
        List<TAI_KHOAN> getTK();
        [OperationContract]
        int checkTK(string Ma_TK, string MatKhau);


        //===========================HSL CO BAN==================
        [OperationContract]
        List<LCB> getLCB();
        [OperationContract]
        int updateLCB(LCB lcb);

        //==========================TINH LUONG CO BAN====================
        [OperationContract]
        int TinhLuong();
        [OperationContract]
        List<TINHLUONG> getLCBtheoThangNam(DateTime dt);
    }
        
    
    

}
